package com.canaan.business.mapper.invoice;

import com.canaan.business.domain.invoice.WmsSalesOrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 销售订单明细Mapper接口
 *
 * @author ruoyi
 * @date 2022-12-13
 */
public interface WmsSalesOrderDetailMapper
{
    /**
     * 查询销售订单明细
     *
     * @param id 销售订单明细主键
     * @return 销售订单明细
     */
    public WmsSalesOrderDetail selectWmsSalesOrderDetailById(Long id);

    /**
     * 查询销售订单明细列表
     *
     * @param wmsSalesOrderDetail 销售订单明细
     * @return 销售订单明细集合
     */
    public List<WmsSalesOrderDetail> selectWmsSalesOrderDetailList(WmsSalesOrderDetail wmsSalesOrderDetail);

    /**
     * 新增销售订单明细
     *
     * @param wmsSalesOrderDetail 销售订单明细
     * @return 结果
     */
    public int insertWmsSalesOrderDetail(WmsSalesOrderDetail wmsSalesOrderDetail);

    /**
     * 修改销售订单明细
     *
     * @param wmsSalesOrderDetail 销售订单明细
     * @return 结果
     */
    public int updateWmsSalesOrderDetail(WmsSalesOrderDetail wmsSalesOrderDetail);

    /**
     * 删除销售订单明细
     *
     * @param id 销售订单明细主键
     * @return 结果
     */
    public int deleteWmsSalesOrderDetailById(Long id);

    /**
     * 批量删除销售订单明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWmsSalesOrderDetailByIds(Long[] ids);

    /**
     * 根据销售订单编号批量删除销售订单明细
     *
     * @param orderNos 销售订单编号
     * @return 结果
     */
    public int deleteByOrderNo(List<String> orderNos);

    List<WmsSalesOrderDetail> listByOrderNos(@Param("nos") List<String> orderNos);

    int batchInsertSalesOrderDetail(List<WmsSalesOrderDetail> details);
}
